package com.project.rfidtodb.config;

import com.project.rfidtodb.service.TimerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 启动运行
 */
@Component
@Slf4j
public class RfidtodbStartRun implements CommandLineRunner {
    @Resource
    private TimerService timerService;
    @Override
    public void run(String... args) throws Exception {
        // 启动运行数据库导出程序
        timerService.dbProcess();
    }
}
